<?php
namespace Admin\Model;

use Think\Model;

class UserExtensionModel extends Model{
	public function updateUserInfo($ss, $uid, $updateData )
	{
        $r = array('d'=>NULL,'i'=>'','r'=>0);
		$ulist = $this->where( $wheres )->find();
		if (!$ulist) {
			$r['i'] = '很抱歉，查找用户失败';
		}
		$where['user_id'] = $uid;
	   $map['state'] = -1;
	   if($ss==''){
	   	 $user = M("user")->where($where)->save($map);
	   	}
	      $ret = $this->where($where)->save( $updateData );
       if ( $ret ){
				$r['r'] = 1;
	            $r['d'] = $this->where($where)->find();
	            $r['i'] = '用户信息更新成功';
			}else{
				$r['i'] ='用户信息更新失败';
			}
		return $r;
	}
}